package com.hongye.agent.controller;

import com.hongye.agent.entity.HongyeHouse;
import com.hongye.agent.entity.PropertyMarketCircleEntity;
import com.hongye.agent.service.PropertyMarketCircleService;
import com.hongye.agent.vo.FindSecondHandHouseVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author caojianbin
 * @time 2022/4/27
 */
@RestController
@RequestMapping("/agent/propertymarketcircle")
public class PropertyMarketCircleController {

    @Autowired
    private PropertyMarketCircleService propertyMarketCircleService;


    /**
     * @return
     * 展示经纪人自己发布的楼市圈列表；按时间倒序排列；
     * 根据时间倒序
     */
    @RequestMapping("/findPropertyMarketCircle/{agentId}")
    public List<PropertyMarketCircleEntity> findSecondHandHouse(@PathVariable("agentId") Long agentId){
        return propertyMarketCircleService.findPropertyMarketCircle(agentId);
    }

}
